body {
  margin: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.table {
  background-color: #cccccc;
}

.table *,
.menu * {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.object {
  position: absolute;
  transform-style: preserve-3d;
  transition: left 0.2s, top 0.2s, transform 0.5s;
}

.front,
.back {
  position: absolute;
  width: 100%;
  height: 100%;
  box-shadow: 0 0 5px black;
  backface-visibility: hidden;
  transition: transform 0.5s;
}

.back {
  transform: rotateY(180deg);
}

.object.turned .front {
  transform: rotateY(180deg);
}

.object.turned .back {
  transform: rotateY(0deg);
}

.pointer {
  position: absolute;
  z-index: 1;
  box-sizing: border-box;
}

#chat {
  position: fixed;
  left: 5px;
  bottom: 0;
  width: 250px;
  background-color: rgba(255, 255, 255, 0.7);
  border: 2px dashed rgba(0, 0, 0, 0.7);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  z-index: 1;
  transition: bottom 0.5s;
}

.chat-toggle {
  position: absolute;
  left: 10px;
  top: -24px;
  width: 40px;
  height: 20px;
  border-radius: 5px 5px 0 0;
  border: 2px dashed rgba(0, 0, 0, 0.7);
  border-bottom: none;
  background-color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#chat-output {
  height: 200px;
  padding: 10px;
  overflow-y: auto;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.chat-output-name {
  margin-right: 5px;
}

.chat-input-wrapper {
  padding: 5px;
  display: flex;
}

#chat-input {
  flex-grow: 1;
}

#scoreboard {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  right: 0;
}

.scoreboard-obj {
  width: 200px;
  height: 200px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 5px 0 0 5px;
  border: 2px dashed rgba(0, 0, 0, 0.7);
  border-right: none;
}

.scoreboard-title {
  font-weight: bold;
  text-align: center;
}

.scoreboard-obj + .scoreboard-obj {
  margin-top: 20px;
}

#dialog {
  position: fixed;
  left: 15%;
  right: 15%;
  top: 15%;
  bottom: 15%;
  border: 2px dashed blue;
  border-radius: 10px;
  background-color: rgba(0, 255, 255, 0.2);
  transition: transform 0.5s;
  z-index: 1;
}

#alert {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 20%;
  font-size: 30px;
  color: blue;
  text-align: center;
}

#form {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 20%;
  display: flex;
  justify-content: space-around;
}

#form input,
#form button {
  border: 1px solid blue;
  border-radius: 7px;
  outline: none;
  color: blue;
  background-color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  padding: 5px 20px;
}

#form button {
  cursor: pointer;
}

#loading {
  position: absolute;
  left: 40%;
  right: 40%;
  bottom: 20%;
  display: flex;
  justify-content: space-between;
}

@keyframes loading {
  0% { transform: scale(1, 1); }
  50% { transform: scale(2, 2); }
  100% { transform: scale(1, 1); }
}

.loading-item {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgb(0, 127, 255);
  animation: 1s linear infinite loading;
}

.loading-item:nth-child(1) {
  animation-delay: -0.67s;
}

.loading-item:nth-child(2) {
  animation-delay: -0.33s;
}

.menu {
  position: fixed;
  display: none;
  z-index: 1;
  width: 150px;
  border: 1px solid gray;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.4);
  background-color: white;
}

.menu li {
  padding: 5px 0;
  text-align: center;
}

.menu li:hover {
  background-color: gray;
}
